<%@ page contentType="text/html; charset=UTF-8" %>
<%@ include file="common.jsp" %>
<%@ page import="com.hitrust.gs.bean.GSOperatorBean" %>
<%@page import="system.LoginContext"%>
<html>
<head>
<title>GS系统</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<!--<LINK href="css/css.css" type=text/css rel=stylesheet>-->
<LINK href="<%=root%>/css/caigouxitong.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style1 {
	color: #000000;
	font-size: 10pt;
	font-weight: bold;
}
-->
</style>
</head>

<%
	String code = (String)request.getAttribute("exception_code");
	String expmessage = (String)request.getAttribute("exception_desc");
	String action = (String)request.getAttribute("action");
	String window = (String)request.getAttribute("window");
	LoginContext tUserBean = (LoginContext)session.getAttribute(GSBaseConstants.LOGIN);
	String target = (String)request.getAttribute("target");;
	String gohistory = (String)request.getAttribute("gohistory");
	if(target==null){
        if(action == null  || tUserBean == null || code.equals(GSException.E00002)){
    	    target = "_top";
    	}else{
    	    target = "main";
    	}
	}
%>
<SCRIPT language="javascript">
	function process(){
		<%
			if(code != null && code.equals(GSException.E00002)){
		%>
				form1.action = "<%= response.encodeURL(request.getContextPath() + "/system/login.jsp") %>";
		<%
			}else if(action!=null){
				if(action.indexOf(".do")!= -1){
		%>
					form1.action = "<%= response.encodeURL(request.getContextPath() + "/" + action) %>";
		<%
				}else{
		%>
					form1.action = "<%= response.encodeURL(request.getContextPath() + "/" + action + ".do")%>";
		<%
				}
			}else if(tUserBean != null){
			    if(window != null && window.equals("true")){
		%>
					window.close();		
		<%	        
			    }else if(action==null){
         %>
                    form1.action = "<%= response.encodeURL(request.getContextPath() + "/system/login.jsp") %>";
         <%           
                }else{
		%>
				    form1.action = "<%= response.encodeURL(request.getContextPath() + action) %>";		
		<%		}
			}else {
				if(window != null && window.equals("true")){
		%>
					window.close();		
		<%		    
				}else{
		%>
					form1.action = "<%= response.encodeURL(request.getContextPath() + "/system/login.jsp") %>";
		<%		}
			}
		%>		
		form1.submit();
	}
</SCRIPT>
<BODY topmargin="0" marginwidth="0">
<form name="form1" method="post" target="<%=target%>">
	<CENTER>
<TABLE border="0" cellspacing="0" cellpadding="0" width="100%" height="90%" style="border-collapse: collapse">
			<TR>
				<TD width="100%" height="275" valign="top"><BR>
				  <BR><BR><BR><BR><BR><BR>
					<DIV align="center">
						<TABLE class=bg_table border="0" width="30%" cellspacing="1" cellpadding="2" height="140">							
						<TR class="bg_column">
				<TD height="25" ><div align="center"><SPAN class=style1>操作失败</span></div></TD>
				</TR>
		    <tr class="bg_row_odd">
		      <td height="102" >
                <p>&nbsp;
                                <img src="images/error.gif" width="36" height="33"> &nbsp;&nbsp;&nbsp;<%=expmessage%> [<%=code%>] </p>
                <div align="center">
<!--                <a href="#" onclick="process()">-->
<!--                <img src="images/button/fanhui.gif" width="58" height="24" class="box">-->
<!--                </a>-->
				<%if(gohistory!=null&&"true".equals(gohistory)){ %>
				<input type="button" value="返回" id="button" class="kuang" onClick="history.go(-1);">
				<%}else{ %>
				<input type="button" value="返回" id="button" class="kuang" onClick="process();">
				<%} %>
                </div></TD>
				</TR>

					  </TABLE>
					</DIV>
			  </TD>
		</TABLE>
		
	</CENTER>
</form>
</body>


</html>